package com.wms.config;

import dev.langchain4j.model.chat.ChatModel;
import dev.langchain4j.model.openai.OpenAiChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author : 阿盛哟
 * @description :
 * @createDate : 2025/7/1 16:24
 */
@Configuration
public class LLMConfig {
    @Bean(name = "chatModelQWen")
    public ChatModel chatModelQWen() {
        String apiKey = System.getenv("TONGYI_API_KEY");//DEEP_SEEK_API_KEY
        return OpenAiChatModel.builder()
                .apiKey(apiKey)
                .modelName("qwen-plus")
                .baseUrl("https://dashscope.aliyuncs.com/compatible-mode/v1")
        .build();
    }

    @Bean(name = "chatModelDeepSeek")
    public ChatModel chatModelDeepSeek() {
        String apiKey = System.getenv("DEEP_SEEK_API_KEY");//
        return OpenAiChatModel.builder()
                .apiKey(apiKey)
                .modelName("deepseek-chat")
                //deepseek-reasoner
                .baseUrl("https://api.deepseek.com/v1")
                .build();
    }
}